package com.wyj.server;

/**
 * TODO: 解析tomcat配置文件，初始化server组件
 *
 * @author wuyijie
 * @date 2021/12/13 21:38
 */
public class Catalina extends BaseLiflecycleBean{

    private Server server;


    public void getServer(){
        this.server= new Server(Digester.SERVICE_LIST);
    }

    @Override
    public String toString() {
        return "Catalina{" +
                "server=" + server +
                '}';
    }

    @Override
    public void init() {
        getServer();
        server.init();
    }

    @Override
    public void start() {
        server.start();

    }
}
